package com.youngwang.lambda;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author youngwang
 *         Date: 2016/9/1
 */
public class CompareTest {

    public static void main(String[] args) {
        List<String> names = Arrays.asList("wangyang", "lichao", "roctian", "niechao", "linxioahui");
        names.forEach(System.out::println);
        System.out.println("-----------------------------");
        names.sort(String::compareTo);
        names.forEach(System.out::println);
    }
}
